Machining program correcting method

ABSTRACT

A method of correcting a machining program for a numerical control device during an execution of the program is provided. A created machining program, which is stored in a memory (5), is executed for a program check, a single block stop is effected at a portion (2) at which an error is found in the machining program, and the machining program is executed in reverse to a predetermined block (P1). Then the machining program is corrected and executed. Accordingly, it is not necessary to return to the beginning of the machining program for a reexecution thereof, and thus the machining program can be efficiently corrected.

DESCRIPTION

1. Technical Field

The present invention relates to a method of correcting a machiningprogram for a numerical control device, and more particularly, to amachining program correcting method which permits an easy correction ofa machining program during an execution thereof.

2. Background Art

Machining programs for a numerical control device must be checked afterthey are created. Particularly when the created machining program islong and complicated, a strict program check is required.

Conventionally, therefore, a machining program is displayed on thedisplay screen of the numerical control device by graphic animation, ora CNC machine tool is operated in dry run mode without setting aworkpiece, to thereby check the machining program.

According to the conventional program checking method, however, when anerror is discovered the machining program must be executed again fromthe beginning thereof, after the error is corrected. Accordingly, eventhough the program part preceding the error has been checked, the entireprogram must be reexecuted, to thereby cause a waste of time during theprogram check.

SUMMARY OF THE INVENTION

The present invention was contrived in view of the above circumstances,and an object thereof is to provide a machining program correctingmethod which permits an easy correction of a machining program during anexecution thereof.

To achieve the above object, according to the present invention, thereis provided a method of correcting a machining program for a numericalcontrol device during an execution of the machining program, comprisingan execution of a created machining program for a program check,effecting a single block stop at a portion at which an error isdiscovered in the machining program, executing the machining program inreverse, to a predetermined block, correcting the machining program, andthen executing same.

When an error is found, the program is executed in reverse to the blockconcerned, usually to the beginning thereof, and after correcting thatblock, the program is executed from the beginning of the block.

Accordingly, it is not necessary to return to the beginning of theprogram for a reexecution thereof.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a conceptual diagram illustrating a machining programcorrecting method according to the present invention;

FIG. 2 is a flowchart for carrying out the machining program correctingmethod according to the invention;

FIGS. 3(a) and 3(b) are flowcharts showing a process of a numericalcontrol device for carrying out the machining program correcting methodaccording to the invention; and

FIG. 4 is a diagram illustrating an arrangement of hardware of anumerical control device (CNC) for carrying out the present invention.

DESCRIPTION OF THE PREFERRED EMBODIMENT

An embodiment of the present invention will be described with referenceto the drawings.

FIG. 1 is a conceptual diagram illustrating a machining programcorrecting method according to the present invention. Here it is assumedthat a machining program is being executed in dry run mode, the pulsedistribution for a path 1 having a sequence number N010 has beencompleted, and that an error is discovered in the machining programduring the pulse distribution for a machining path 2 having a sequencenumber N011.

At this time, a programmer turns on a single block stop switch, wherebya numerical control device effects a single block stop at an end pointP2 of the machining path 2 (N011).

The programmer then turns on a reverse switch, and when the reverseswitch is turned on, the numerical control device carries out a reversepulse distribution of the machining path 2, to thereby return to a pointP1 along a path 3.

The programmer corrects the machining program at this point, and thenpushes a cycle start button, whereby the numerical control devicerestarts the program from the point P1.

To permit the reverse execution of a program, an auxiliary memory 6 isprovided in the numerical control device, in addition to a memory 5 forstoring the machining program, so that movement data for which the pulsedistribution has been completed is stored in the auxiliary memory 6. InFIG. 1, the program is illustrated as if it is stored in the auxiliarymemory 6 in units of blocks, but in practice, since instructionscorresponding to one block are subdivided for the pulse distribution,movement data is stored in the auxiliary memory 6 upon each pulsedistribution. When the reverse switch is pushed, a reverse pulsedistribution is carried out by using the movement data stored in theauxiliary memory 6, to thereby effect a reverse execution of theprogram. Although in the above description the program is checked in adry run mode, it may be checked by drawing a workpiece and a tool on adisplay screen by graphic animation.

FIG. 2 is a flowchart for carrying out the machining program correctingmethod according to the present invention. In the figure, the numbersfollowing "S" represent step numbers.

[S1] A machining program is started for a program check, and movementdata is stored in the auxiliary memory 6 every time the pulsedistribution is effected.

[S2] The program is checked for error; if no error is discovered,execution of the program is continued. If an error is discovered, theflow proceeds to S3.

[S3] The single block switch is turned on, whereby the numerical controldevice effects a single block stop.

[S4] The programmer turns on the reverse switch on an operator panel,whereby the program is executed in reverse by using the movement datastored in the auxiliary memory 6.

[S6] The necessary correction is made.

[S7] The program is restarted from the block to which the program hasbeen retraced.

Namely, the machining program is executed in reverse to a predeterminedblock, corrected, and restarted from that block, and accordingly, it isnot necessary to return to the beginning of the machining program andrestart the program from that point every time an error is corrected,whereby a correction of the machining program, and accordingly, aprogram check, are simplified.

A flowchart of a process executed by the numerical control device willbe now described. FIGS. 3(a) and 3(b) illustrate flowcharts for thenumerical control device, according to the machining program correctingmethod of the invention. In the figures, the numbers following "S"represent step numbers.

[S11] One block of a machining program is read.

[S12] If the machining program is not ended, the flow proceeds to S13.

[S13] Movement data is created for pulse distribution.

[S14] The movement data is stored in the auxiliary memory 6.

[S15] If no reverse command is input, the flow proceeds to S16. If areverse command is input, the flow proceeds to S17.

[S16] Pulse distribution is executed for movement. (Referring to FIG.3(b))

[S17] Data stored in the auxiliary memory 6 during the execution of theprogram is read.

[S18] The program is executed in reverse in accordance with the readdata.

[S19] The pointer of the program is returned based on the executed data.

[S20] It is determined whether or not the reverse command is ended; ifit is not ended, the flow returns to S17 to continue the reverseexecution of the program.

The hardware for carrying out the present invention will be nowdescribed. FIG. 4 is a schematic diagram of hardware of a numericalcontrol device (CNC) for carrying out the present invention. In FIG. 4,numeral 11 denotes a processor for global control; 12 denotes a ROM forstoring a control program; 13 denotes a RAM for storing various data; 14denotes a nonvolatile memory for storing a machining program andparameters, etc., such as a CMOS backed up by a battery, or the like;and 14a denotes a machining program.

Numeral 15 denotes a PMC (programmable machine controller) whichconverts received commands, such as M-function and T-function, etc.,into signals for controlling a machine tool, in accordance with asequence program 15a, and outputs the converted signals. Numeral 16denotes a display control circuit for converting a digital signal into adisplay signal; 16a denotes a display device comprising a CRT,liquid-crystal display unit, or the like; and 17 denotes a keyboard usedfor inputting various data.

Numeral 18 denotes a position control circuit for controlling aservomotor; 19 denotes a servo amplifier for controlling the speed ofthe servomotor; 20 denotes the servomotor; 21 denotes a tachometergenerator for effecting a speed feedback; and 22 denotes a positiondetector comprising a pulse coder, optical scale, or the like. Therequired number of these elements corresponds to the number of axes, butonly those necessary for one axis are illustrated.

Numeral 23 denotes an input/output circuit which transfers digitalsignals with respect to an external unit and is connected to a machineside control circuit. A signal SBK from the single block switch and asignal RVS from the reverse switch are supplied to the input/outputcircuit 23 from a machine side operator panel. Numeral 24 denotes amanual pulse generator mounted on the machine operator panel, fordigitally moving individual axes.

The above embodiment uses only one processor, but a multi-processorsystem including a plurality of processors may be used instead,depending on the system configuration.

According to the present invention, as described above, when an error isfound in a machining program, the program is executed in reverse to thepredetermined part, the error is corrected, and the program isrestarted. Accordingly, it is not necessary to return to the beginningof the machining program every time a correction is made, thusfacilitating the correction of machining programs, and accordingly, theprogram check.

We claim:
 1. A method of correcting a machining program for a numericalcontrol device during an execution of the machining program, said methodcomprising the steps of:a) executing a created machining program for aprogram check; b) effecting a single block stop at a portion in themachining program at which an error is discovered in the machiningprogram; c) executing the machining program in reverse to apredetermined block; and d) correcting the machining program and thenexecuting same.
 2. A method according to claim 1, wherein the reverseexecution of the machining program is effected by a reverse switchprovided on an operator panel.
 3. A method according to claim 1, furthercomprising a substep of storing movement data in an auxiliary memoryduring the execution of the machining program for a program check, andeffecting the reverse execution of the machining program in accordancewith the movement data stored in the auxiliary memory.
 4. A methodaccording to claim 1, wherein the execution of the machining program fora program check is effected in a dry run mode without using a workpiece.5. A method according to claim 1, wherein the execution of the machiningprogram for a program check is effected by displaying a workpiece and atool on a display screen by graphic animation.